﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/MasterPage.master" AutoEventWireup="true"
    CodeFile="ShoppingCart.aspx.cs" Inherits="Pages_ShoppingCart" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" runat="Server">
    <asp:Label ID="titleLabel" runat="server" Text="Ваша корзина" CssClass="ShoppingCartTitle" />
    <br />
    <asp:Label ID="statusLabel" CssClass="AdminPageText" ForeColor="Red" runat="server" />
    <br />
    <asp:GridView ID="grid" runat="server" AutoGenerateColumns="False" BorderWidth="1px"
        DataKeyNames="id_present" Width="100%" OnRowDeleting="grid_RowDeleting" BackColor="White"
        BorderColor="#CC9966" BorderStyle="None" CellPadding="4">
        <Columns>
            <asp:BoundField DataField="name_p" HeaderText="Название" ReadOnly="True" SortExpression="name_p" />
            <asp:BoundField DataField="price" DataFormatString="{0:c}" HeaderText="Цена" ReadOnly="True"
                SortExpression="price" />
            <asp:TemplateField HeaderText="Количество">
                <ItemTemplate>
                    <asp:TextBox ID="editQuantity" runat="server" Width="24px" MaxLength="2" Text='<%#Eval("amount")%>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Subtotal" DataFormatString="{0:c}" HeaderText="Стоимость"
                ReadOnly="True" SortExpression="Subtotal" />
            <asp:ButtonField ButtonType="Button" CommandName="Delete" Text="Удалить" />
        </Columns>
        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
        <RowStyle BackColor="White" ForeColor="#330099" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
        <SortedAscendingCellStyle BackColor="#FEFCEB" />
        <SortedAscendingHeaderStyle BackColor="#AF0101" />
        <SortedDescendingCellStyle BackColor="#F6F0C0" />
        <SortedDescendingHeaderStyle BackColor="#7E0000" />
    </asp:GridView>
    <table width="100%">
        <tr>
            <td>
                <span class="ProductDescription">Общая сумма: </span>
                <asp:Label ID="totalAmountLabel" runat="server" Text="Label" CssClass="ProductPrice" />
            </td>
            <td align="right">
                <asp:Button ID="checkoutButton" runat="server" CssClass="SmallButtonText" 
                    Text="Оформить заказ" onclick="checkoutButton_Click" />
            </td>
            <td align="right">
                <asp:Button ID="updateButton" runat="server" Text="Обновить корзину" CssClass="SmallButtonText"
                    OnClick="updateButton_Click" />
            </td>
        </tr>
    </table>
    <br />
    <asp:Button ID="continueShoppingButton" runat="server" Text="Продолжить покупку"
        CssClass="SmallButtonText" OnClick="continueShoppingButton_Click" />
    <br />
    <br />
</asp:Content>
